<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
<link rel="stylesheet" type="text/css" href="/js/jquery.flipcountdown.css" />
<link rel="stylesheet" href="/js/bootstrap-3.3.2-dist/css/bootstrap.css" type="text/css" />

    <script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="/js/jquery.bootstrap.min.js"></script>
    <script type="text/javascript" src="/js/bootstrap-3.3.2-dist/js/bootstrap.js"></script>
<script type="text/javascript" src="/js/jquery.flipcountdown.js"></script>
<style type="text/css">
        .el-userhead{
            width: 100px;
            height: 100px;
            display: block;
            margin: 0px auto;

        }
        .muted{
            color: #999;
        }
        .text-info{
            color: #09d;
        }
    </style>
<!--[if IE 6]>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>投标详情</title>
</head>
<body >
<div class="page-container">
    <div class="col-sm-9">
        <div class="row">
            <div class="col-sm-3">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        借款人
                    </div>
                    <div class="panel-body">
                        <img class="el-userhead" src="/images/person_icon.png" />
                        <p class="text-center">
                            <a class="text-info" href="#"><span id="username"></span></a>
                        </p><br />
                        <div>
                            认证信息：
                            <label class="label label-success">
                                <span class="glyphicon glyphicon-user"></span>
                            <!--<span class="glyphicon glyphicon-eye-open"></span>-->
                        </label>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-sm-6">
            <h3 class="text-info" style="margin-top: 0px;">
                <span id="title"></span>借款
                <small>&emsp;<label class="label label-primary">信</label></small>
            </h3>
            <div>
                <table width="100%" height="250px">
                    <tr>
                        <td class="muted" width="80px">借款金额</td>
                        <td class="text-info" width="120px" style="padding-left: 10px;">
                            <span id="bidRequestAmount"></span>
                        </td>
                        <td class="muted" width="80px">年化利率</td>
                        <td class="text-info" style="padding-left: 10px;">
                            <span id="currentRate"></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="muted ">借款期限</td>
                        <td class="text-info" style="padding-left: 10px;">
                            <span id="monthsReturn"></span>
                        </td>
                        <td class="muted">总可得利息</td>
                        <td class="text-info" style="padding-left: 10px;">
                            <span id="totalRewardAmount"></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="muted">还款方式</td>
                        <td class="text-info" style="padding-left: 10px;">
                            <span id="returnTypeDisplay"></span>
                        </td>
                        <td class="muted">最小投标</td>
                        <td class="text-info" style="padding-left: 10px;">
                            <span id="minBidAmount"></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="muted">风控意见</td>
                        <td class="text-info" style="padding-left: 10px;" colspan="3">
                            <span id="note"></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="muted">剩余时间</td>
                        <td class="text-info" style="padding-left: 10px;" colspan="3">
                            <div id="retroClockBox"></div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="col-sm-3">
            <table style="height:110px;width:230px;">
                <tr>
                    <td  class="muted">投标总数</td><td class="text-info" style="padding-left: 10px;">
                    <span id="persent"></span>
                </td>
                </tr>
                <tr>
                    <td  class="muted">还需金额</td><td class="text-info" style="padding-left: 10px;">
                    <span id="remainAmount"></span> 元
                </td>
                </tr>
                <tr>
                    <td  class="muted" colspan="2">投标进度</td>
                </tr>
                <tr>
                    <td colspan="2">
                        <div style="margin-bottom: 10px;" class="progress">
                            <div style="width:0px" id="schedule" class="progress-bar progress-bar-info progress-bar-striped"></div>
                        </div>
                    </td>
                </tr>
            </table>

            <br />
            <h4 class="text-primary" id="state0" style="display: none">审核中</h4>
            <a class="btn btn-danger btn-block" style="font-size: 18px;display: none" href="#" id="state1" >
                投标中
            </a>
            <h4 class="text-primary" id="state4" style="display: none">满标审核中</h4>
            <h4 class="text-primary" id="state7" style="display: none">还款中</h4>
            <h4 class="text-primary" id="state8" style="display: none">已还清</h4>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <div style="font-size: 16px;">标的审核信息</div>
    </div>
    <div class="panel-body">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>审核类型</th>
                <th>审核时间</th>
                <th>审核人</th>
                <th>备注</th>
            </tr>
            </thead>
            <tbody id="auditInfo">
            </tbody>
        </table>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        借款人信息
    </div>
    <div class="panel-body">
        <table>
            <tbody>
            <tr>
                <td class="muted text-right" width="140px;">真实姓名</td>
                <td width="150px;" style="padding-left: 10px;" class="text-info">
                    <span id="anonymousRealName"></span>
                </td>
                <td class="muted text-right" width="140px;">生日</td>
                <td width="150px;" style="padding-left: 10px;" class="text-info">
                    <span id="bornDate"></span>
                </td>
                <td class="muted text-right" width="140px;">身份证号码</td>
                <td width="150px;" style="padding-left: 10px;" class="text-info">
                    <span id="anonymousIdNumber"></span>
                </td>
                <td class="muted text-right" width="140px;">身份证地址</td>
                <td width="150px;" style="padding-left: 10px;" class="text-info">
                    <span id="anonymousAddress"></span>
                </td>
            </tr>
            <tr>
                <td class="muted text-right" width="140px;">注册时间</td>
                <td width="150px;" style="padding-left: 10px;" class="text-info">
                    <span id="createTime"></span>
                </td>
                <td class="muted text-right" width="140px;">借款额度</td>
                <td width="150px;" style="padding-left: 10px;" class="text-info">
                    <span id=""></span>
                </td>
                <td class="muted text-right" width="140px;">性别</td>
                <td width="150px;" style="padding-left: 10px;" class="text-info">
                    <span id="sexDisplay"></span>
                </td>
                <td class="muted text-right" width="140px;">住房条件</td>
                <td width="150px;" style="padding-left: 10px;" class="text-info">
                    <span id="houseCondition"></span>
                </td>
            </tr>
            <tr>
                <td class="muted text-right">文化程度</td>
                <td style="padding-left: 10px;" class="text-info">
                    <span id="educationBackground"></span>
                </td>
                <td class="muted text-right">每月收入</td>
                <td style="padding-left: 10px;" class="text-info">
                    <span id="incomeGrade"></span>
                </td>
                <td class="muted text-right">婚姻情况</td>
                <td style="padding-left: 10px;" class="text-info">
                    <span id="marriage"></span>
                </td>
                <td class="muted text-right">子女情况</td>
                <td style="padding-left: 10px;" class="text-info">
                    <span id="kidCount"></span>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <div style="font-size: 16px;">材料信息</div>
    </div>
    <div class="panel-body">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>材料类型</th>
                <th>材料数量</th>
            </tr>
            </thead>
            <tbody id="userFiles">
            </tbody>
        </table>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <div style="font-size: 16px;">还款情况</div>
    </div>
    <div class="panel-body">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>还款状态</th>
                <th>最近一周</th>
                <th>最近1月</th>
                <th>最近6月</th>
                <th>6个月前</th>
                <th>总计[?]</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>提前还款</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
            </tr>
            <tr>
                <td>准时还款</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
            </tr>
            <tr>
                <td>逾期已还</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
            </tr>
            <tr>
                <td>逾期未还</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
                <td>0</td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-heading">
        <div style="font-size: 16px;">投标记录</div>
    </div>
    <div class="panel-body">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>投标人</th>
                <th>年利率 </th>
                <th>有效金额(¥)</th>
                <th>投标时间</th>
                <th>类型</th>
            </tr>
            </thead>
            <tbody>
            <!--<tr>-->
                <!--<td>${bid.bidUser.username}</td>-->
                <!--<td>-->
                    <!--${bid.actualRate}%-->
                <!--</td>-->
                <!--<td style="padding-right:60px;" class="text-info">-->
                    <!--${bid.availableAmount}-->
                <!--</td>-->
                <!--<td>-->
                    <!--${bid.bidTime?string("yyyy-MM-dd HH:mm:ss")}-->
                <!--</td>-->
                <!--<td>手动投标</td>-->
            <!--</tr>-->
            <tr>
                <td colspan="6">
                    <p class="text-primary text-center">暂时没有投标数据</p>
                </td>
            </tr>
        </tbody>
        </table>
    </div>
</div>

</div>
</div>
</div>

</div>


<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="lib/jquery.validation/1.14.0/messages_zh.js"></script> 
<script type="text/javascript">
var id=parent.id;
$.ajax({
		url:"borrowInfo.do",
		data:{"id":id},
		dataType:"json",
	    type:"POST",
		success:function(res){
			if(res.status===0){
			    var data=res.data;
                $("#username").text(data.bidRequest.createUser.username);
                $("#title").text(data.bidRequest.title);
                $("#bidRequestAmount").text(data.bidRequest.bidRequestAmount);
                $("#currentRate").text(data.bidRequest.currentRate + "%");
                $("#monthsReturn").text(data.bidRequest.monthsReturn + "月");
                $("#totalRewardAmount").text(data.bidRequest.totalRewardAmount + "元");
                $("#returnTypeDisplay").text(data.bidRequest.returnTypeDisplay);
                $("#minBidAmount").text(data.bidRequest.minBidAmount + "元");
                $("#note").text(data.bidRequest.note);
                $("#persent").text(data.bidRequest.persent);
                $("#remainAmount").text(data.bidRequest.remainAmount);
                $("#retroClockBox").flipcountdown({
                    size:'xs',
                    beforeDateTime:data.bidRequest.disableDate
                });
                if(data.bidRequest.bidRequestState ==0){
                    $("#state0").show()
                }
                if(data.bidRequest.bidRequestState ==1){
                    $("#state1").show()
                }
                if(data.bidRequest.bidRequestState ==4 || data.bidRequest.bidRequestState ==5){
                    $("#state4").show()
                }
                if(data.bidRequest.bidRequestState ==7){
                    $("#state7").show()
                }
                if(data.bidRequest.bidRequestState ==8){
                    $("#state8").show()
                }
                var width= (data.bidRequest.persent/data.bidRequest.bidRequestAmount)*400.0;
                $("#schedule").attr("style","width:"+width+"px");
                $("#anonymousRealName").text(data.realAuth.anonymousRealName);
                $("#bornDate").text(data.realAuth.bornDate);
                $("#anonymousIdNumber").text(data.realAuth.anonymousIdNumber);
                $("#anonymousAddress").text(data.realAuth.anonymousAddress);
                $("#createTime").text(data.userInfo.createTime);
                $("#sexDisplay").text(data.realAuth.sexDisplay);
                $("#houseCondition").text(data.userInfo.houseCondition.title);
                $("#educationBackground").text(data.userInfo.educationBackground.title);
                $("#incomeGrade").text(data.userInfo.incomeGrade.title);
                $("#marriage").text(data.userInfo.marriage.title);
                $("#kidCount").text(data.userInfo.kidCount.title);
                if(data.bidRequestAuditHistory!=null){
                    var html="";
                    for(var i=0;i<data.bidRequestAuditHistory.length;i++){
                        html+='<tr style="cursor: pointer;" lid="2101" st="1" class="more">';
                        html+='<td>'+data.bidRequestAuditHistory[i].auditTypeDisplay+'</td>'
                        html+='<td>'+data.bidRequestAuditHistory[i].auditTime+'</td>'
                        html+='<td>'+data.bidRequestAuditHistory[i].auditor.username+'</td>'
                        html+='<td>'+data.bidRequestAuditHistory[i].remark+'</td>'
                        html+='</tr>'
                    }
                    $("#auditInfo").html(html);
                }
                if(data.userFiles!=null){
                    var html="";
                    for(var i=0;i<data.userFiles.length;i++){
                        html+='<tr style="cursor: pointer;" lid="2101" st="1" class="more">';
                        html+='<td>'+data.userFiles[i].fileTypes.title+'</td>'
                        html+='<td>1</td>'
                        html+='</tr>'
                    }
                    $("#userFiles").html(html);
                }
			}
		}
	})

</script>
</body>
</html>